let EventEmitter = require("./EventEmitter");

function Girl() {}
Girl.prototype.__proto__ = EventEmitter.prototype;

const girl = new Girl();

let o1 = function () {
  console.log("1");
};
girl.on("newListener", function (eventName) {
  console.log(eventName);
});

girl.once("我失恋了", o1);
girl.on("我失恋了", function () {
  console.log("2");
});
girl.off("我失恋了", o1);
girl.emit("我失恋了", "a", "b");
girl.emit("我失恋了", "a", "b");
